#"nop" - Do nothing
#  Goto Main1 (0x00)

#Start simulation, with the xilinx libraries and ps resolution
vsim -L UNISIM -L XILINXCORELIB -t ps work.top_level

#RESET WAVE-DISPLAY
restart -force -nowave

#View the wave
view wave

#Set time units
formatTime +bestunits +commas

add wave -noupdate -divider "Instruction: nop"

#Initialize Wave-window
do Init.do

#===============================================================================

# REGISTER RE - none
 force -deposit sim:/top_level/mir(3:0) 16#FF
run 2ns

 #nop1 - BYTECODE

 #Addr - 0h02 (address of "Main1")
 force -deposit sim:/top_level/mir(35:27) 16#02
 #JMPC - 0 (address from Addr)
 force -deposit sim:/top_level/mir(26) 0
 #JAMN - 0 (ignore N-bit)
 force -deposit sim:/top_level/mir(25) 0
 #JAMZ - 0 (ignore Z-bit)
 force -deposit sim:/top_level/mir(24) 0
 
 #ALU - 0
  force -deposit sim:/top_level/mir(23) 0
  force -deposit sim:/top_level/mir(22) 0
  force -deposit sim:/top_level/mir(21) 0
  force -deposit sim:/top_level/mir(20) 1
  force -deposit sim:/top_level/mir(19) 0
  force -deposit sim:/top_level/mir(18) 0
  force -deposit sim:/top_level/mir(17) 0
  force -deposit sim:/top_level/mir(16) 0

 #REGISTER WE -
  force -deposit sim:/top_level/mir(15) 0 
  force -deposit sim:/top_level/mir(14) 0 
  force -deposit sim:/top_level/mir(13) 0 
  force -deposit sim:/top_level/mir(12) 0 
  force -deposit sim:/top_level/mir(11) 0 
  force -deposit sim:/top_level/mir(10) 0 
  force -deposit sim:/top_level/mir(9) 0
  force -deposit sim:/top_level/mir(8) 0 
  force -deposit sim:/top_level/mir(7) 0 

 # MEMORY ACCESS - 
 force -deposit sim:/top_level/mir(6) 0
 force -deposit sim:/top_level/mir(5) 0
 force -deposit sim:/top_level/mir(4) 0
 
 # REGISTER RE - none
 force -deposit sim:/top_level/mir(3:0) 16#FF

run 40ns
